from django.urls import path, include
from .views import ProblemAPIView, ProblemDetailAPIView, ProblemGet, SubmitAPIView, ProblemAdmin
from rest_framework.urlpatterns import format_suffix_patterns

urlpatterns = [
    path('',ProblemAPIView.as_view()),
    path('<int:pk>',ProblemDetailAPIView.as_view()),
    path('<str:problem_code>',ProblemGet.as_view()),
    path('submit/', SubmitAPIView.as_view()),


    # 以下是 admin 的方法
    path('list/', ProblemAdmin.as_view()),
]

urlpatterns = format_suffix_patterns(urlpatterns)